An electronic device (e.g., a mobile phone) may be locked using a password. When the electronic device is locked, a user may use a password that is not easy to break, to keep the electronic device safe and avoid theft of information.